Skip to content

Support bundle mode for inline Python tasks#34

Merged
Volv-G merged 1 commit into
masterfrom
piforge/inline-task-bundle-mode
Jul 19, 2026
Merged

Support bundle mode for inline Python tasks#34
Volv-G merged 1 commit into
masterfrom
piforge/inline-task-bundle-mode

Conversation

@Volv-G

@Volv-G Volv-G commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

What

Adds mode and resolve_root controls to the inline Python @task path:

  • @task(..., mode=..., resolve_root=...)
  • stores the values on CallableRef
  • emits them into auto-generated <stem>.components.yaml local_from_python entries
  • forwards the values through CallableRef.materialize()
  • adds compiler/hydrator tests for sidecar emission and hydrate-time forwarding

This reuses the existing components generate from-python --mode bundle / module_bundler.py machinery; it does not add a new bundler.

Why

Pipeline inline @task components currently auto-emit local_from_python sidecars in default inline mode only. That means generated task runtimes can depend on the container image already shipping first-party Python modules.

For the compile OSS migration, the downstream Discovery Daily Pulse combine-run-data proof needs inline @task wrappers to bundle first-party modules (for example relevance_tools.eval.combine_run_data_core) so the generated component is self-contained with respect to first-party source. External dependencies still come from the image, as they do for standalone bundle mode.

This PR is part 1 of the stack. A downstream Discovery change will bump this submodule commit and switch the combine-run-data inline wrappers to mode="bundle".

Tests

  • git diff --check
  • uv run ruff check packages/tangle-cli/src/tangle_cli/python_pipeline/task.py packages/tangle-cli/src/tangle_cli/python_pipeline/ref.py packages/tangle-cli/src/tangle_cli/pipeline_compiler.py tests/test_pipeline_compiler.py tests/test_pipelines_cli.py
  • uv run pytest tests/test_component_from_func.py tests/test_pipeline_compiler.py tests/test_pipelines_cli.py -q — 253 passed

AI-assisted.

Assisted-By: devx/b49d7847-4e8a-45eb-8304-dacd6e78458e
@Volv-G
Volv-G requested a review from Ark-kun as a code owner July 19, 2026 18:54
@Volv-G
Volv-G merged commit 736be92 into master Jul 19, 2026
2 checks passed
@Volv-G Volv-G mentioned this pull request Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant